package com.app.service.impl.superarket;

import com.app.mapper.supermarket.CommentMapper;
import com.app.mapper.supermarket.MyCollectMapper;
import com.app.model.supermarket.CommentModel;
import com.app.model.supermarket.MyCollectModel;
import com.app.service.supermarket.CommentService;
import com.app.service.supermarket.MyCollectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * @Description:零活
 * @Author: N
 * @Date: 2022年11月24日 10点29分
 */
@Service
@Primary
public class MyCollectServiceImpl implements MyCollectService {
    @Autowired
    MyCollectMapper myCollectMapper;


    @Override
    public void insert(MyCollectModel model) {
        myCollectMapper.insert(model);
    }

    @Override
    public void delete(int id) {
        myCollectMapper.delete(id);
    }

    @Override
    public List<MyCollectModel> getCollectByMid(MyCollectModel model) {
        return myCollectMapper.getCollectByMid(model);
    }

    @Override
    public List<MyCollectModel> getCollectByOid(MyCollectModel model) {
        return myCollectMapper.getCollectByOid(model);
    }

    @Override
    public int deleteByOid(int keyId, int mid) {
        return myCollectMapper.deleteByOid(keyId,mid);
    }

    @Override
    public MyCollectModel selectByOid(int keyId, int mid) {
        return myCollectMapper.selectByOid(keyId, mid);
    }

    @Override
    public int countMid(int mid) {
        return myCollectMapper.countMid(mid);
    }
}
